﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System.Xml.Linq;
using System.ComponentModel;
using Newtonsoft.Json;

namespace WeiboSdkSample
{
    public class StatusItem
    {
        [JsonProperty("original_pic")]
        public string OriginalPic { get; set; }
        [JsonProperty("idstr")]
        public string StatusID { get; set; }
        [JsonProperty("bmiddle_pic")]
        public string BmiddlePic { get; set; }
        [JsonProperty("thumbnail_pic")]
        public string ThumbnailPic { get; set; }
        [JsonProperty("text")]
        public string Message { get; set; }
        [JsonProperty("favorited")]
        public bool Favorited { get; set; }
        [JsonProperty("created_at")]
        public string CreateTime { get; set; }
        [JsonProperty("repost_status")]
        public StatusItem RetweetedStatus { get; set; }

        public bool IsRetweetedStatus
        {
            get
            {
                return RetweetedStatus == null;
            }
        }

        public string IsThumbnail { get; set; }
        [JsonProperty("source")]
        public string Source { get; set; }

        [JsonProperty("user")]
        public StatusUser User { get; set; }
    }

    public class StatusUser
    {
        [JsonProperty("id")]
        public string ID { get; set; }
        [JsonProperty("name")]
        public string Name { get; set; }
        [JsonProperty("gender")]
        public string Gender { get; set; }
        [JsonProperty("followers_count")]
        public string FollowersCount { get; set; }
        [JsonProperty("friends_count")]
        public string FriendsCount { get; set; }
        [JsonProperty("statuses_count")]
        public string StatusesCount { get; set; }
        [JsonProperty("created_at")]
        public string CreatedAt { get; set; }
        [JsonProperty("verified")]
        public string IsVerified { get; set; }
        [JsonProperty("following")]
        public string IsFollowing { get; set; }
        [JsonProperty("location")]
        public string Location { get; set; }
        [JsonProperty("description")]
        public string Description { get; set; }
        [JsonProperty("profile_image_url")]
        public string ProfileImage { get; set; }
        [JsonProperty("url")]
        public string URL { get; set; }
        [JsonProperty("status")]
        public StatusItem Status { get; set; }
    }
}
